<?php

namespace App\Controller\Admin\Crontab;

use App\Controller\Admin\BaseController;
use App\Service\Crontab\CrontabLogService;
use App\Service\Crontab\CrontabService;
use Hyperf\Di\Annotation\Inject;
use Yj\Apidog\Annotation\ApiController;
use Yj\Apidog\Annotation\FormData;
use Yj\Apidog\Annotation\PostApi;

/**
 * @ApiController(prefix="admin/crontab/log")
 */
class CrontabLogController extends BaseController
{
    /**
     * @Inject()
     * @var CrontabLogService
     */
    protected $crontabLogService;
    
    /**
     * @PostApi(path="lists")
     * @FormData(key="crontab_id")
     * @FormData(key="keywords",rule="nullable")
     */
    public function lists()
    {
        $params = $this->getParams();
        $data = $this->crontabLogService->lists($params);
        _SUCCESS($data);
    }

}